package com.example.aopdemo.demos.web.controller;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;

@Slf4j
@Aspect
@Component
public class MyAspectDemo {
    @Before("@annotation(com.example.aopdemo.demos.web.MyAspect)")
    public  void  doBefore(){
        log.info("执行MyAspectDemo before");
    }

}
